package com.edu.service.impl;

import com.edu.bean.Goods;
import com.edu.bean.GoodsVO;
import com.edu.mapper.GoodsMapper;
import com.edu.service.GoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class GoodsServiceImpl implements GoodsService {

    @Resource
    GoodsMapper goodsMapper;

    @Override
    public Goods selectGoods(int GoodsId) {
        return goodsMapper.selectGoodsById(GoodsId);
    }

    @Override
    public List<GoodsVO> selectGoodsAll(Goods goods) {
        return goodsMapper.selectAllGoods(goods);
    }

    @Override
    public int addGoods(Goods goods) {
        return goodsMapper.insertGoods(goods);
    }
}
